<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    img {
        display: block;
        margin: 100px auto;
        transition: all 1s;
    }
    img:hover {
        /* transform: rotate3d(1,0,0,45deg); */
        transform: rotate3d(1,1,0,45deg);
    }
</style>
<body>
    <img src="media/pic.jpg">
</body>
</html>